import request from "./request";

// 用户登录
export const userLogin = (form) => {
  return request({
    method: "POST",
    url: "/login",
    data: form,
  });
};

// 退出登录
export const userLogout = (id) => {
  return request({
    method: "get",
    url: `/logout/${id}`,
  });
};

// 获取用户列表
export const getuserList = (form) => {
  return request({
    method: "GET",
    url: "/user/list",
    params: form,
  });
};

// 编辑用户
export const userEditlData = (form) => {
  return request({
    method: "POST",
    url: "/user/edit",
    data: form,
  });
};

// 新增用户
export const userAddlData = (form) => {
  return request({
    method: "POST",
    url: "/user/save",
    data: form,
  });
};

// 删除用户
export const userDellData = (id) => {
  return request({
    method: "GET",
    url: `/user/delete/${id}`,
  });
};
